import request, { downloadFile } from '@/utils/request'
import api from '@/api/devOps'


const dataDicInfoApi = {
  exportHistoryData: '/dataExport/exportHistoryData',
  exportMainStatus:'/dataExport/exportMainStatus',
  totalElecGenAndComsume: '/dataExport/totalElecGenAndComsume'
}


export default dataDicInfoApi

/**
 *
 * @param parameter
 * @returns {*}
 */
export function exportHistoryData(params) {
  return downloadFile({
    url: dataDicInfoApi.exportHistoryData,
    params
  })
}
export function exportMainStatus(params) {
  return downloadFile({
    url: dataDicInfoApi.exportHistoryData,
    methods:'post',
    data:params
  })
}
export function deleteoperation(parameter) {
  return request({
    url:dataDicInfoApi.exportMainStatus,
    method: 'post',
    data:parameter
  })
}

/**
 * 计算数据
 * @param parameter
 * @returns {*}
 */
export function totalElecGenAndComsume(parameter) {
  return request({
    url:dataDicInfoApi.totalElecGenAndComsume,
    method: 'get',
    params:parameter
  })
}
